﻿<UserControl x:Class="SL_Drag_Drop.sucDragDropAnimation"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:dragdrop="clr-namespace:SL_Drag_Drop_BaseClasses;assembly=SL_Drag_Drop_BaseClasses"
    xmlns:local="clr-namespace:SL_Drag_Drop">
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>


        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="10">
            <TextBlock Text="Easing animations" 
                       FontSize="14"
                       HorizontalAlignment="Left" VerticalAlignment="Top"
                       ></TextBlock>
            <TextBlock TextWrapping="Wrap" Margin="0,10,0,0" >
                <Run Text="These are all DragSources on DropTargets with a few of the different possible return animation values (duration, easing) applied to them.  All possible easing functions and properties supported by Silverlight 3 are supported. "></Run>  
                <LineBreak></LineBreak>
                <Run Text="First one: default (ReturnAnimationDuration = 0.2, ReturnAnimationEasingFunction = null).  "></Run>
                <LineBreak></LineBreak>
                <Run Text="Second one: ReturnAnimationDuration = 1, ReturnAnimationEasingFunction = PowerEase.  "></Run>
                <LineBreak></LineBreak>
                <Run Text="Third one: ReturnAnimationDuration = 2, ReturnAnimationEasingFunction = ElasticEase. "></Run>
                <LineBreak></LineBreak>
                <Run Text="Fourth one: ReturnAnimationDuration = 2, ReturnAnimationEasingFunction = BounceEase."></Run>
                <LineBreak></LineBreak>
                <LineBreak></LineBreak>
                <Run Text="All these properties (duration, easing) can also be applied on the switch animation (= the animation you see when 2 DragSources switch place after a drop) if needed!"></Run>
            </TextBlock>
        </StackPanel>

        <StackPanel Orientation="Vertical" HorizontalAlignment="Center"
                           Grid.Row="1" Grid.Column="0">
            <dragdrop:DropTarget Width="100" Height="100" >
                <dragdrop:DropTarget.Content>
                    <dragdrop:DragSource AllDropTargetsValid="True" >
                        <local:DragSourceContent>
                            
                        </local:DragSourceContent>
                       

                    </dragdrop:DragSource>
                </dragdrop:DropTarget.Content>
                <dragdrop:DropTarget.Ghost>
                    <local:DropTargetGhost></local:DropTargetGhost>
                </dragdrop:DropTarget.Ghost>
            </dragdrop:DropTarget>


            <dragdrop:DropTarget Width="100" Height="100">
                <dragdrop:DropTarget.Content>
                    <dragdrop:DragSource AllDropTargetsValid="True"
                                         ReturnAnimationDuration="1" >
                        <dragdrop:DragSource.ReturnAnimationEasingFunction>
                            <PowerEase EasingMode="EaseInOut" ></PowerEase>
                        </dragdrop:DragSource.ReturnAnimationEasingFunction>
                        <local:DragSourceContent>

                        </local:DragSourceContent>


                    </dragdrop:DragSource>
                </dragdrop:DropTarget.Content>
                <dragdrop:DropTarget.Ghost>
                    <local:DropTargetGhost></local:DropTargetGhost>
                </dragdrop:DropTarget.Ghost>
            </dragdrop:DropTarget>

        </StackPanel>


        <StackPanel Orientation="Vertical" HorizontalAlignment="Center"
                           Grid.Row="1" Grid.Column="1">
           

            <dragdrop:DropTarget Width="100" Height="100">
                <dragdrop:DropTarget.Content>
                    <dragdrop:DragSource AllDropTargetsValid="True"
                                         ReturnAnimationDuration="2" >
                        <dragdrop:DragSource.ReturnAnimationEasingFunction>
                            <ElasticEase EasingMode="EaseInOut"></ElasticEase>
                        </dragdrop:DragSource.ReturnAnimationEasingFunction>
                        <local:DragSourceContent>

                        </local:DragSourceContent>


                    </dragdrop:DragSource>
                </dragdrop:DropTarget.Content>
                <dragdrop:DropTarget.Ghost>
                    <local:DropTargetGhost></local:DropTargetGhost>
                </dragdrop:DropTarget.Ghost>
            </dragdrop:DropTarget>

            <dragdrop:DropTarget Width="100" Height="100">
                <dragdrop:DropTarget.Content>
                    <dragdrop:DragSource AllDropTargetsValid="True"
                                         ReturnAnimationDuration="2" >
                        <dragdrop:DragSource.ReturnAnimationEasingFunction>
                            <BounceEase Bounces="2" EasingMode="EaseInOut"></BounceEase>
                        </dragdrop:DragSource.ReturnAnimationEasingFunction>
                        <local:DragSourceContent>

                        </local:DragSourceContent>


                    </dragdrop:DragSource>
                </dragdrop:DropTarget.Content>
                <dragdrop:DropTarget.Ghost>
                    <local:DropTargetGhost></local:DropTargetGhost>
                </dragdrop:DropTarget.Ghost>
            </dragdrop:DropTarget>
        </StackPanel>

    </Grid>
</UserControl>
